//https://leetcode.cn/problems/sum-of-two-integers/

class Solution {
public:
    int getSum(int a, int b) {
        while (b != 0)
        {
            //求两个数的无进位相加
            size_t x = a ^ b;
            //求进位
            size_t  carry = (size_t)a & b;

            //更新a和b
            a = x;
            b = carry << 1;
        }

        return a;

    }
};